﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using JSMVP.Domain;

namespace JSMVP.Presenters
{
    public class ShoppingCartPresenter
    {
        private ICartView _view;
        private Cart _cart;
        public ShoppingCartPresenter()
        {

        }
        public ShoppingCartPresenter(ICartView view, Cart cart)
        {
            _view = view;
            _cart = cart;
        }

        public void DisplayCart()
        {
            if (_cart.Items == null || _cart.Items.Count == 0)
            {
                _view.ErrorMessage = "There are No Items In Your Cart";
                return;
            }

        }
    }
}
